import { ref, computed } from "vue"

import { defineStore } from "pinia"

// 对外部暴露一个 use 方法，该方法会导出我们定义的 state

const usePodStore = defineStore('pod', function () {

    const pods = ref([])


    async function loadPodsList() {

        let result = await window.k8s_GetPods()
        //console.log(result.items)
        pods.value = result.items

    }

    return {

        pods, loadPodsList

    }

})



export default useNamespaceStore